import request from "@/utils/request";


// 获取下拉框、药品类型、用药类型、使用类型
export function medicineGetarr (params = {}) {
  return request({
    url: 'medicine/getarr',
    method: 'get',
    params
  })
}
// 药品列表
export function medicineIndex (params = {}) {
  return request({
    url: 'medicine/index',
    method: 'get',
    params
  })
}
// 添加药品
export function medicineAdd (data = {}) {
  return request({
    url: 'medicine/add',
    method: 'post',
    data,
    isJSON: false
  })
}
// 药品详情
export function medicineInfo (params = {}) {
  return request({
    url: 'medicine/info',
    method: 'get',
    params
  })
}
// 修改药品
export function medicineEdit (data = {}) {
  return request({
    url: 'medicine/edit',
    method: 'post',
    data,
    isJSON: false
  })
}
// 库存记录
export function medicineStocklog (params = {}) {
  return request({
    url: 'medicine/stocklog',
    method: 'get',
    params
  })
}
// 损耗
export function medicineDamaged (data = {}) {
  return request({
    url: 'medicine/damaged',
    method: 'post',
    data,
    isJSON: false
  })
}
//调整库存
export function medicineModifystock (data = {}) {
  return request({
    url: 'medicine/modifystock',
    method: 'post',
    data,
    isJSON: false
  })
}
// 药品删除
export function medicineDelete (params = {}) {
  return request({
    url: 'medicine/delete',
    method: 'get',
    params
  })
}
//药品搜索
export function medicineSearch (data = {}) {
  return request({
    url: 'medicine/search',
    method: 'post',
    data,
    isJSON: false
  })
}
// 处方列表
export function chufangIndex (params = {}) {
  return request({
    url: 'chufang/index',
    method: 'get',
    params
  })
}
//添加处方
export function chufangAdd (data = {}) {
  return request({
    url: 'chufang/add',
    method: 'post',
    data,
    isJSON: false
  })
}
// 处方详情
export function chufangInfo (params = {}) {
  return request({
    url: 'chufang/info',
    method: 'get',
    params
  })
}
// 处方删除
export function chufangDelete (params = {}) {
  return request({
    url: 'chufang/delete',
    method: 'get',
    params
  })
}
// 疾病列表
export function illnessIndex (params = {}) {
  return request({
    url: 'illness/index',
    method: 'get',
    params
  })
}
// 添加疾病
export function illnessAdd (data = {}) {
  return request({
    url: 'illness/add',
    method: 'post',
    data,
    isJSON: false
  })
}
// 疾病详情
export function illnessInfo (params = {}) {
  return request({
    url: 'illness/info',
    method: 'get',
    params
  })
}
// 修改疾病
export function illnessEdit (data = {}) {
  return request({
    url: 'illness/edit',
    method: 'post',
    data,
    isJSON: false
  })
}
//删除疾病
export function illnessDelete (params = {}) {
  return request({
    url: 'illness/delete',
    method: 'get',
    params
  })
}

//出库记录
export function removeInfoList (params = {}) {
  return request({
    url: 'output/list',
    method: 'get',
    params
  })
}


//查询可以出库的药品
export function removeResearch (params = {}) {
  return request({
    url: 'medicine/search',
    method: 'get',
    params
  })
}

//查询可以出库的药品
export function removeResearchInfo (params = {}) {
  return request({
    url: 'output/info',
    method: 'get',
    params
  })
}

//出库指定药品
export function removeDetails (data = {}) {
  return request({
    url: 'output/create',
    method: 'post',
    data,
    isJSON: false
  })
}

// 添加处方

